package com.pb.infra.oth.util;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;

/**
 * 常量
 *
 * @author liudebao
 * @date 2020/1/1
 */
public class Constant {
    public static final String OK = "0";

    public static final String ERROR = "-1";

    public static final String EXIST = "1";

    public static final String INSERT_OK_MSG = "新增成功";

    public static final String INSERT_ERROR_MSG = "新增失败";

    public static final String UPDATE_OK_MSG = "修改成功";

    public static final String UPDATE_ERROR_MSG = "修改失败";

    public static final String DELETE_OK_MSG = "删除成功";

    public static final String COPY_OK_MSG = "复制成功";

    public static final String IMPORT_OK_MSG = "导入成功";

    public static final String IMPORT_ERROR_MSG = "导入失败";

    public static final String EXCEL_FONT = "微软雅黑";

    public static final short EXCEL_TITLE_FONT_SIZE = 12;

    public static final short EXCEL_DATA_FONT_SIZE = 10;

    public static final String EXCEL_NUMBER_FORMAT2 = "#,##0.00";

    public static final String EXCEL_NUMBER_FORMAT = "#,##0.000000";

    public static final String STRING = "STRING";

    public static final String DOUBLE = "DOUBLE";

    public static final String DOUBLE2 = "DOUBLE2";

    public static final String INTEGER = "INTEGER";

    public static final String NUMBER = "NUMBER";

    public enum ACTION_NAME {ADD, DEL, MOD, IMP, EXP, UP, DOWN, QUERY}

    public static final String SAVE_OK_MSG = "保存成功";

    public static final int BATCH_COUNT = 500;

    public static final int EXCEL_HEAD_COLOR_R = 47;

    public static final int EXCEL_HEAD_COLOR_G = 117;

    public static final int EXCEL_HEAD_COLOR_B = 181;

    public static final String DATE_FORMAT_8 = "yyyyMMdd";

    public static final String DATE_FORMAT_10 = "yyyy-MM-dd";

    public static final String USER_STATE_ONE = "ACTIVE";

    public static final String USER_STATE_TWO = "AUTO-LOCKED";

    public static final String USER_STATE_THREE = "MAN-LOCKED";

    public static final String USER_NUMBER_ZERO = "0";

    public static final String USER_NUMBER_ONE = "1";

    public static final String USER_NUMBER_TWO = "2";

    public static final String SYSTEM_ADMIN = "sysadmin";

    public static final String SYSTEM_ADMIN_ASS = "MQ==";

    public static final String USER_INIT_ASS = "VGVzdEAxMjM=";

    public static final String ROLE_ADMIN = "admin";

    public static final String ROLE_ADMIN_NAME = "系统管理员";

    public static final String USER_PASS_ERROR = "502";

    public static final String USER_PASS_TIME = "512";

    public static final String INSERT_EXIT_MSG = "当前业务已存在，请修改业务标识";

    public static final String INSERT_NUMBER_LETTER = "请输入数字和英文";

    public static final String INSERT_EXIT_BUSINESSID = "您输入的业务标识已存在";

    public static final String INSERT_EXIT_CNNAME = "您输入的中文名称已存在";

    public static final String EXCEPTION_CODE = "-100000";

    /** 利息计算方式：实际/360 */
    public static final String INTER_CALC_TYPE_DIV360 = "L07001";
    /** 利息计算方式：实际/365 */
    public static final String INTER_CALC_TYPE_DIV365 = "L07002";
    /** 利息计算方式：30/360 */
    public static final String INTER_CALC_TYPE_30DIV360 = "L07003";
    /** 利息计算方式：30/365 */
    public static final String INTER_CALC_TYPE_30DIV365 = "L07004";
    /** 利息计算方式：实际/实际 */
    public static final String INTER_CALC_TYPE_DIVACT = "L07005";

    /** 计算过程中除法计算保留的小数点后位数 */
    public static final int DIVIDE_ROUND_LENGTH = 99;
    /** 计算金额的结果保留的小数点后位数 */
    public static final int AMT_RESULT_ROUND_LENGTH = 2;

    /** 付款及重定价频率单位：天 */
    public static final String PAYMENT_FREQ_MULT_DAY = "D";
    /** 付款及重定价频率单位：月 */
    public static final String PAYMENT_FREQ_MULT_MONTH = "M";
    /** 付款及重定价频率单位：季 */
    public static final String PAYMENT_FREQ_MULT_SEASON = "S";
    /** 付款及重定价频率单位：年 */
    public static final String PAYMENT_FREQ_MULT_YEAR = "Y";


    /** 结息属性：结息日付息（计算利息时第一期天数+1，最后一期天数-1） */
    public static final String INTEREST_CALCULATE_CODE_FIRST_DAY_COUNT = "L18001";
    /** 结息属性：结息日次日付息 */
    public static final String INTEREST_CALCULATE_CODE_NEXT_DAY_COUNT = "L18002";

    /**
     * yyyyMMdd格式的日期转换器
     *
     * @return
     */
    public static SimpleDateFormat getDATE_FORMAT_YYYYMMDD() {
        return new SimpleDateFormat("yyyyMMdd");
    }
    public static SimpleDateFormat getDATE_FORMAT_YYYYMM() {
        return new SimpleDateFormat("yyyyMM");
    }

    /** 节假日算息方式：按计划日算息 L09001 **/
    public static final String HOLIDAY_CALC_TYPE_PLAN = "L09001";
    /** 节假日算息方式：按支付日算息 L09002 **/
    public static final String HOLIDAY_CALC_TYPE_PAY = "L09002";

    /** 全局信息文件路径 cap_ext_file_url */
    public static final String CAP_EXT_FILE_URL = "sysPath";
    /*基础信息配置当前系统环境*/
    public static  final String SYSTEM_ENVIRONMENT = "DEV";
    /*公共接口*/
    public static  final ArrayList<String> initInterList = new ArrayList<String>(Arrays.asList(
            "/v1/sys/common/selectLastApp",
            "/v1/sys/common/selAllApp",
            "/v1/login/getUserInfo",
            "/v1/login/logout",
            "/v1/login/getRouter",
            "/v1/login/editPassword",
            "/v1/login/lockUser",
            "/v1/sys/common/selUserPosition",
            "/v1/sys/common/selMainPositon",
            "/v1/sys/common/selPositionInfo",
            "/v1/sys/common/selAllCorpList",
            "/v1/sys/LeadingOut/selectAllFile",
            "/v1/sys/LeadingOut/getFileJudgeData",
            "/v1/sys/common/selBusiCode",
            "/v1/sys/common/selCorpList",
            "/v1/sys/common/insertLastApp",
            "/v1/sys/common/selBtnAuthInfo",
            "/v1/system/role/saveInterAuth",
            "/v1/sys/common/getCodeTypeData2",
            "/v1/system/menu/queryAllInter",
            "/v1/sys/common/dict/code/*",
            "/v1/metadata/importConfig/importExcel"));
}
